<!--
@Description:角色名单列表
@Author:zqy
@Date:2024-01-19 10:07:46
@Last Modified by:zqy
@Last Modified time:2024-01-19 10:07:46
-->
<template>
  <div class="qup-full-page" style="padding:0">
    <inside-page v-show="!showEdit" :titles="['角色名单','名单配置', `${detail.name}（${filterRoleStatus(detail.status)}${[2,'2'].includes(detail.status)? '：'+parseTime(detail.effectiveBeginTime):''}）`]" @go-back="goBack">
      <div class="content-table">
        <CustomerList :role-id="detail.id" />
      </div>
      <div class="content-table">
        <UserList :role-id="detail.id" />
      </div>
    </inside-page>
  </div>
</template>

<script>
import { parseTime } from '@/utils'
import UserList from './userList'
import CustomerList from './customerList'
export default {
  name: 'RoleConfigList',
  filters: {
    fiterTime: parseTime
  },
  components: { UserList, CustomerList },
  props: {
    pageShow: {
      type: String,
      default: '' // config 配置  ，detail 详情
    },
    detail: {
      type: [String, Object],
      default: ''
    }
  },
  data() {
    return {
      showEdit: false,
      editData: '' // 编辑楼层详情数据
    }
  },
  computed: {
    nowPageShow: {
      get() {
        return this.pageShow
      },
      set(val) {
        this.$emit('update:pageShow', val)
      }
    }
  },
  watch: {

  },
  created() {

  },
  mounted() {

  },
  methods: {
    parseTime,
    goBack() {
      this.nowPageShow = false
    },
    filterRoleStatus(val) {
      const temp = ['不生效', '生效', '定时生效']
      return temp[val] || ''
    }
  }
}
</script>
<style lang='scss' scoped>
.content-table{
  padding: 15px 0;
}
</style>
